package demo1;

import java.util.Calendar;

public class Test {
    public static void func(int a) {
        if(a == 0) {
            //throw new CloneNotSupportedException("a == 0");
            throw new ArithmeticException("a == 0");
        }
        System.out.println(10/a);
    }

    public static void main(String[] args) {
        try {
            func(1);
            System.out.println("hhhhhh1");
        }catch (ArithmeticException e){
            e.printStackTrace();
            System.out.println("捕捉到了算数异常");
        }finally {
            System.out.println("finally执行");
        }
        System.out.println("hhhhhh2");
    }
}
